package com.jlpay.openapi.demo.marketing;

import com.jlpay.open.jlpay.sdk.java.model.marketing.request.MerchantActivityUpdateRequest;
import com.jlpay.open.jlpay.sdk.java.model.marketing.response.MerchantActivityUpdateResponse;
import com.jlpay.open.jlpay.sdk.java.utils.json.JsonUtils;
import com.jlpay.openapi.demo.JlpayOpenApiService;
import com.jlpay.openapi.demo.openmerch.query.MerchBaseInfoQueryService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author liaochangyi
 * @date 2025-08-10  14:00
 */
public class MerchantActivityUpdateService {

    private static final Logger LOGGER = LoggerFactory.getLogger(MerchBaseInfoQueryService.class);

    public static void main(String[] args) {
        MerchantActivityUpdateRequest merchantActivityConfigQueryRequest = buildMerchantActivityUpdateRequest();
        MerchantActivityUpdateResponse response = JlpayOpenApiService.openMerchService()
                .post(merchantActivityConfigQueryRequest, MerchantActivityUpdateResponse.class);
        LOGGER.info("商户活动修改响应:{}", JsonUtils.toString(response));
    }

    private static MerchantActivityUpdateRequest buildMerchantActivityUpdateRequest() {
        MerchantActivityUpdateRequest request = new MerchantActivityUpdateRequest();
        // 商户号
        request.setMerchNo("84940535193A026");
        request.setActId("act610000064");
        request.setStatus("join");
        return request;
    }
}
